﻿// 替换为你需要遍历的文件夹路径
using FileRead;
using Listen;

string directoryPath = @"/Users/song/Nutstore Files";

try
{
    var md =  new MarkdownFile(directoryPath);
    var mdDirPaths = md.GetDstDirByLinqReg();
    var listen =  new ListenMerge(mdDirPaths);
    listen.MergeMdFile();
    
    










}
catch (UnauthorizedAccessException ex)
{
    Console.WriteLine($"没有权限访问 {directoryPath}。错误详情: {ex.Message}");
}
catch (DirectoryNotFoundException ex)
{
    Console.WriteLine($"{directoryPath} 未找到。错误详情: {ex.Message}");
}